From 1738724e4a9dfe8a8d3e8f7209e24c2afcf77560 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Thu, 17 Dec 2020 15:01:35 +0000 Subject: [PATCH] Notify properties on deletion in PasswordEntryBuffer The GtkEntryBufferClass.deleted_text() behaviour changed between GTK3 and GTK4, which means any subclass of GtkEntryBuffer is now responsible for emitting the "notify" signal for the "text" and "length" properties. Without this, the GtkText delegate widget used by GtkPasswordEntry would not be able to communicate changes in the contents of its buffer. Fixes: #3484 --- gtk/gtkpasswordentrybuffer.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gtk/gtkpasswordentrybuffer.c b/gtk/gtkpasswordentrybuffer.c index 2c97417f26..bc9cc0daa9 100644 --- a/gtk/gtkpasswordentrybuffer.c +++ b/gtk/gtkpasswordentrybuffer.c @@ -135,6 +135,9 @@ gtk_password_entry_buffer_real_deleted_text (GtkEntryBuffer *buffer, memmove (self->text + start, self->text + end, self->text_bytes + 1 - end); self->text_chars -= n_chars; self->text_bytes -= (end - start); + + g_object_notify (G_OBJECT (buffer), "text"); + g_object_notify (G_OBJECT (buffer), "length"); } static guint -- 2.30.2